<%@ page import="cn.zdnf.bean.Ec_article" %>
<%@ page import="java.util.List" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/css/index_right.css?v=2012">
</head>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
	$(function() {
		var text_length = 30;
		var goods_text = $("#art_text").text().length;
		if (goods_text > text_length) {
			$("#art_text").text(
					$("#art_text").text().substring(0, text_length) + "...");
		}
	});
</script>
<body>
	<div class="in_r_div1">
		<div class="in_r_div2">
			<form action="${pageContext.request.contextPath}/IndexServlet">

				物品类型： <select>
					<option value="1">护肤</option>
					<option value="2">彩妆</option>
					<option value="3">香气</option>
					<option value="4">身体护理</option>
					<option value="5">礼盒套装</option>
					<option value="6">母婴专区</option>
					<option value="7">男士专区</option>
					<option value="8">粉底</option>
					<option value="9">粉饼</option>
					<option value="10">睫毛膏</option>
					<option value="11">唇彩</option>
					<option value="12">腮红</option>
				</select> <input type="text" class="in_r_input1" name="sousuo"> <input
					type="submit" value="搜索">
			</form>
		</div>
		<div class="in_r_div3">
			<span>护肤</span>
		</div>
		<div class="in_r_div4">
	
			<table>
				<tr>
					<c:forEach var="li" items="${list }" varStatus="status"  >
						<td class="in_td"><a
							href="${pageContext.request.contextPath}/SpInfoServlet?sp_id=${li.id}"><img
								alt="找不到图片" src="${pageContext.request.contextPath}/image/article/${li.image}"></a> <br>
							<span class="in_r_sp1">￥:${li.price}</span><span class="in_r_sp2">￥:<fmt:formatNumber type="number" value="${li.price*li.discount}" pattern="0.00" maxFractionDigits="2"></fmt:formatNumber></span>
							<br> <a href="" class="in_r_a" id="art_text">${li.title}</a></td>

						<!-- 处理一行显示几个图片 -->

						<c:if test="${status.count%4==0 }">

							<tr>
						</c:if>


					</c:forEach>
				</tr>
			</table>

		</div>

	</div>
</body>
</html>